﻿using System;
using System.Runtime.InteropServices;

namespace Ast.Core.Services.ObjectDefinitions
{
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    public struct ObjectHeader
    {
        public int PointerCount; // +0x000 PointerCount     : Int4B

        public int HandleCount; // +0x004 HandleCount      : Int4B

        public int Lock; // +0x008 Lock             : _EX_PUSH_LOCK

        public byte TypeIndex; // +0x00c TypeIndex        : UChar

        public byte TraceFlags; // +0x00d TraceFlags       : UChar

        public byte InfoMask; // +0x00e InfoMask         : UChar

        public byte Flags; // +0x00f Flags            : UChar

        public IntPtr ObjectCreateInfo; // +0x010 ObjectCreateInfo : Ptr32 _OBJECT_CREATE_INFORMATION

        public IntPtr SecurityDescriptor; // +0x014 SecurityDescriptor : Ptr32 Void
    }
}